package vip.xiaonuo.modular.callnum.task;

import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import vip.xiaonuo.core.timer.TimerTaskRunner;
import vip.xiaonuo.modular.callnum.entity.CallNum;
import vip.xiaonuo.modular.callnum.service.CallNumService;

@Component
@Slf4j
public class CleanExpiredNumTask implements TimerTaskRunner {


    @Autowired
    private CallNumService callNumService;


    @Override
    public void action(String jobParams, String taskIds) {
        LambdaUpdateWrapper<CallNum> updateWrapper = new LambdaUpdateWrapper<CallNum>().set(CallNum::getUseFlag, Boolean.TRUE);
        callNumService.update(updateWrapper);
    }

    @Override
    @XxlJob("DeviceHeartBeatTask")
    public void executeXxlJob() {
    }


}
